package server;

import java.io.IOException;

/**
 * @author 陶肖寅
 * @version V1.0
 * @Package server
 * @date 2020-02-24 13:49
 * @Copyright © 2020-2021 城云科技(中国)有限公司
 */
public class LagouServlet extends HttpServlet {
    @Override
    public void doGet(Request request, Response response) {
        String content = "<h1>demo2 LagouServlet get</h1>";
        try {
            response.output(HttpProtocolUtil.getHttpHeader200(content.length())+content);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    @Override
    public void doPost(Request request, Response response) {
        String content = "<h1>demo2 LagouServlet post</h1>";
        try {
            response.output(HttpProtocolUtil.getHttpHeader200(content.length())+content);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    @Override
    public void init() throws Exception {

    }

    @Override
    public void destory() throws Exception {

    }
}
